The IPropOwnerDrawSink Interface

The owner-draw capabilities of the PropertyList control require an object that implements this interface. This can be done by adding the IPropOwnerDraw.tlb file to your project through the References dialog, which is listed under "Excalibur PropertyList Owner-draw Interface" if the typelib has been registered, and adding the following line to the General Declarations section of a class module or form:

Implements IPropOwnerDrawSink

You can then use the SetOwnerDrawSink method of the PropertyList to enable owner-draw. Note that you will see adverse effects in the control if you add owner-draw items to it without setting the owner-draw sink object.

The interface also provides facilities to use your own control for the second column of the property list when your owner-drawn item is selected. This allows you to create items that use more than the color dropdown, combo box or textbox controls used in the built-in item types.
All controls that you add for owner-draw should be made children of the property list control.

IPropOwnerDrawSink Members

Certain parameters mean the same thing for each member of the interface. These parameters are:
- sPropListName - nIndex The members of this interface are as follows:

Sub PropCommitPending(sPropListName As String)

Sub PropDrawItem(sPropListName As String, _
nIndex As Integer, _
bDrawActive As Boolean, _
DrawDC As Long, _
rctLeft As Long, rctTop As Long, _
rctRight As Long, rctBottom As Long
)

Sub PropHideCtrls(sPropListName As String)

Sub PropPlaceCtrl(sPropListName As String, _
nIndex As Integer, _
rctLeft As Long, rctTop As Long, _
rctWidth As Long, rctHeight As Long
)